package com.johnlee.sentinel_quick_start.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class TestService_01 {

    // @Async 表示方法为异步调用
    @Async
    public void helloAsync(){
        System.out.println("===========异步开始===========");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("===========异步结束===========");
    }
}
